package com.android.qjpmc.widget.retrofithelper.http;


import com.android.qjpmc.bean.AlarmRecordItemBean;
import com.android.qjpmc.bean.GroupInfoPointDataBean;
import com.android.qjpmc.bean.PwrDeviceBean;
import com.android.qjpmc.bean.GroupPointHisListBean;
import com.android.qjpmc.bean.PointParameterBean;
import com.android.qjpmc.bean.LoginInfoBean;
import com.android.qjpmc.bean.SiteStationBean;
import com.android.qjpmc.bean.SiteStationObjBean;
import com.android.qjpmc.bean.StationVideoListBean;
import com.android.qjpmc.widget.bean.BannerInfo;

import com.android.qjpmc.widget.bean.BaseListData;
import com.android.qjpmc.widget.bean.BaseRequestData;
import com.android.qjpmc.widget.bean.UploadFileBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;

/**
 * @Author zhangshuqi
 * @CreateTime 2018/4/10
 * @Describe
 */

public interface ApiServer {
    @FormUrlEncoded
    @POST("v1/SaveFile/base64")
    Observable<BaseRequestData<List<UploadFileBean>>> uploadFileWithRequestBody(@Field("base64") String multipartBody);

    @POST("crm/upload/addFile")
    Observable<BaseRequestData<String>> uploadFileWithRequestBody(@Body MultipartBody multipartBody);

    Observable<BaseRequestData<List<BannerInfo>>> getBannerInfo(Map<String, Object> map);

    @FormUrlEncoded
    @POST("account/autoRegisterAndBind")
    Observable<BaseRequestData<String>> register(@FieldMap Map<String, Object> map);

    @FormUrlEncoded
    @POST("account/resetPwd")
    Observable<BaseRequestData<Object>> passwordReset(@FieldMap Map<String, Object> map);

    @FormUrlEncoded
    @POST("account/setPwd")
    Observable<BaseRequestData<Boolean>> passwordSet(@FieldMap Map<String, Object> map);


    @GET("user/login")
    Observable<BaseRequestData<Object>> login(@QueryMap Map<String, Object> map);

    @PUT("v1/member/Password_Set")
    Observable<BaseRequestData<Object>> editPassword(@Body Map<String, Object> map);

    @FormUrlEncoded
    @POST("account/sendValidCode")
    Observable<BaseRequestData<Object>> getVerifyCode(@FieldMap Map<String, Object> map);

    @GET("account/sendValidCode4Test")
    Observable<BaseRequestData<String>> getVerifyTestCode(@QueryMap Map<String, Object> map);

    @GET("v1/member/reauth")
    Observable<BaseRequestData<LoginInfoBean>> refreshToken();

    @GET("v1/member/reauth")
    Call<BaseRequestData<LoginInfoBean>> refreshTokenCall();


    @GET("push/jpush/getMyCourseTagId")
    Observable<BaseRequestData<List<String>>> getMyCourseTagId();


    @POST("user/location/record")
    Observable<BaseRequestData<Object>> uploadLocation(@Body Map<String, Object> map);

    @POST("company/page")
    Observable<BaseRequestData<BaseListData<SiteStationBean>>> getStationList(@Body Map<String, Object> map);

    @POST("device/query")
    Observable<BaseRequestData<List<PwrDeviceBean>>> getGroupListOfStation(@Body Map<String, Object> map);

    @POST("camera/queryCamera")
    Observable<BaseRequestData<List<StationVideoListBean>>> getVideoListOfStation(@Body Map<String, Object> map);

    @POST("deviceProps/page")
    Observable<BaseRequestData<BaseListData<PointParameterBean>>> getPointDataOfGroup(@Body Map<String, Object> map);

    @POST("data/getRealtime")
    Observable<BaseRequestData<Object>> getPointDataOfPointCode(@Body Map<String, Object> map);

    @GET("data/realtime/station/{stationId}/group/{groupId}/type/{type}")
    Observable<BaseRequestData<List<GroupInfoPointDataBean>>> getPointDataOfGroup(@Path("stationId") String stationId, @Path("groupId") String groupId, @Path("type") long type);

    @POST("tsdb/queryMultiTimeWindow")
    Observable<BaseRequestData<Object>> getPointHistoryDataOfStation(@Body Map<String, Object> map);

    @POST("device/save")
    Observable<BaseRequestData<Object>> saveDeviceInfo(@Body Map<String, Object> map);

    @POST("data/setRealtime")
    Observable<BaseRequestData<Object>> setDataRealtime(@Body Object map);

    @POST("alarm/page")
    Observable<BaseRequestData<BaseListData<AlarmRecordItemBean>>> getAlarmRecordList(@Body Map<String, Object> map);


}




